﻿using Serilog;
using Serilog.Core;
using Serilog.Events;

namespace Proxy
{
    public class SerilogHandle
    {
        /// <summary>
        /// 系统日志
        /// </summary>
        public static Logger Logger_System = new LoggerConfiguration().WriteTo.File("logs\\System-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// PLC日志
        /// </summary>
        public static Logger Logger_Plc = new LoggerConfiguration().WriteTo.File("logs\\Plc-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// Production
        /// </summary>
        public static Logger Logger_Production = new LoggerConfiguration().WriteTo.File("logs\\Production-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// DealWithDataReq日志
        /// </summary>
        public static Logger Logger_DealWithDataReq = new LoggerConfiguration().WriteTo.File("logs\\DealWithDataReq-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// DealWithPosReq
        /// </summary>
        public static Logger Logger_DealWithPosReq = new LoggerConfiguration().WriteTo.File("logs\\DealWithPosReq-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// DealWithLabelReq
        /// </summary>
        public static Logger Logger_DealWithLabelReq = new LoggerConfiguration().WriteTo.File("logs\\DealWithLabelReq-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// DealWithRePosReq
        /// </summary>
        public static Logger Logger_DealWithRePosReq = new LoggerConfiguration().WriteTo.File("logs\\DealWithRePosReq-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// DealWithReLabelALLReq
        /// </summary>
        public static Logger Logger_DealWithReLabelALLReq = new LoggerConfiguration().WriteTo.File("logs\\DealWithReLabelALLReq-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// Logger_UI
        /// </summary>
        public static Logger Logger_UI = new LoggerConfiguration().WriteTo.File("logs\\UI-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// Logger_Search
        /// </summary>
        public static Logger Logger_Search = new LoggerConfiguration().WriteTo.File("logs\\DataSearch-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// Logger_Insert
        /// </summary>
        public static Logger Logger_Insert = new LoggerConfiguration().WriteTo.File("logs\\DataInsert-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// Logger_Delete
        /// </summary>
        public static Logger Logger_Delete = new LoggerConfiguration().WriteTo.File("logs\\DataDelete-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// Logger_Modify
        /// </summary>
        public static Logger Logger_Modify = new LoggerConfiguration().WriteTo.File("logs\\DataModify-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
    }
}
